Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 6 - Transform Objects / Transform Objects Reference
Functions / Transforming Shapes by Modifying Shape Geometries


GXMoveShapeTo

You can use the GXMoveShapeTo function to move a shape to a specified position.

void GXMoveShapeTo(gxShape target, Fixed x, Fixed y);
target
A reference to the shape you want to move.
x
The horizontal coordinate of the position to move the shape to.
y
The vertical coordinate of the position to move the shape to.
DESCRIPTION
The GXMoveShapeTo function moves the shape referenced by the target parameter to the position specified by the x and y parameters. The position corresponds to a specific point in the shape's geometry:

This function relocates the target shape in one of two ways:

The target shape can be any shape type. However, if the target shape is an empty shape, a full shape, or a picture shape, this function has no effect unless the shape's gxMapTransformShape attribute is set.

The horizontal and vertical coordinates are specified in geometry space.

SPECIAL CONSIDERATIONS
This function does not necessarily move the target shape to the position in local
space specified by the x and y parameters. Furthermore, if the shape's gxMapTransformShape attribute is set, this function does not necessarily move
the shape to the same position it would if the gxMapTransformShape attribute
were cleared:

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
shape_access_not_allowed(debugging version)
Warnings 
move_shape_out_of_range 
graphic_type_cannot_be_moved 
Notices (debugging version) 
mapping_unaffected 
SEE ALSO
For an example of the use of this function, see page 6-27.

To move a shape to a specified position by altering the mapping property of its transform object, you can also use the GXMoveTransformTo function, described on page 6-59.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996